package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {
    @Value("${person.name}")
    private String name;
    @Value("${person.age}")
    private int age;
    @RequestMapping("/hello")
    @ResponseBody
    public String sayHello() {
        return "hello" + name + age;
    }
}
